package com.heima.behavior.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.behavior.pojos.ApArticleLikes;
import org.apache.ibatis.annotations.Mapper;

/**
 * 文章点赞行为数据持久层
 * @author huangjianfei
 * @date 2024/11/08
 */
@Mapper
public interface ApArticleLikesMapper extends BaseMapper<ApArticleLikes> {

    ApArticleLikes selectByArticleIdAndUserId(Long articleId, Integer userId);

    /**
     * 新增点赞记录
     * @param likes
     */
    void insertApArticleLikes(ApArticleLikes likes);

    /**
     * 更新点赞记录
     * @param likes
     */
    void updateApArticleLikes(ApArticleLikes likes);

}
